Technote IC 515 | October 1990 |
Last reviewed: 11/6/91
Can I use the PPC Toolbox's program linking dialog interface via the PPCBrowser function with AppleTalk protocols such as ADSP, ATP, and DDP? If not, can I access the ADSP data structures used by the PPC Toolbox?
___
The PPCBrowser function is for use by applications that use the PPC Toolbox, high-level events, or Apple events (high-level events and Apple events depend on the services of the PPC Toolbox). The PPCBrowser uses the functions GetZoneList, PLookupName, and IPCListPorts to fill the AppleTalk Zones, Macintoshes, and Programs lists in the program linking dialog. Since the IPCListPorts function returns a list of PPCPorts at a particular location, it isn't useful for AppleTalk protocols and thus, makes the PPCBrowser function unsuitable for use with AppleTalk protocols which don't have PPCPorts associated with them. It's fairly easy for an application to create a browsing dialog for AppleTalk protocols that has two lists, one for zones found with GetZoneList and one for entity names found with PLookupName. See the "dmz" example on the Macintosh System Software 7 Golden Master CD for example code that builds two such lists.
Although the PPC Toolbox currently uses ADSP as the transport mechanism to communicate with other Macintosh systems, the ADSP structures used by the PPC Toolbox aren't accessible for good reason: The transport mechanism used by the PPC Toolbox could change in the future to support other transport mechanisms besides ADSP. (On the local machine, PPC transfers the data directly, circumventing ADSP.) If you really need to use ADSP in a way that the PPC Toolbox does not, then you should skip the PPC Toolbox and use ADSP directly.
Last reviewed: 8/1/92
Before closing a PPC port with PPCClose, is it necessary to call PPCEnd for my open sessions?
___
It isn't always necessary to call PPCEnd before closing a PPC port. Calling PPCClose by itself will invalidate any active sessions for the given port and force the completion routines of all outstanding asynchronous calls to be called. This should be sufficient to close the port.
However, there are a few instances where you will want to call PPCEnd. If an error is returned in the completion routine of an asynchronous PPCRead or PPCWrite call you should then call PPCEnd asynchronously. This will allow PPC Toolbox resources to be released so they may be reused. If PPCEnd is not called in this manner, it will prevent the PPC Toolbox from cleaning up resources that it used for the active session.
Last reviewed: 3/25/99 (updated to point to latest AutoGuest software)
I'd like to be able to start an Apple event-based session between two machines that are networked together without the user identity dialog box that always comes up, even if I only want to use Guest access. Is there any way I can use the PPC Toolbox's PPCStart function to create a Guest session and use it for Apple Events?
___
Sessions set up by the Apple Event Manager with other Macintosh computers are always authenticated. That's why you always get to see the user identity dialog box, even if you want to use Guest access. You're always automatically authenticated with other processes on the local system and that's the only time you won't see the user identity dialog box.
You cannot use the PPC Toolbox to start a session and then pass that session off to the Apple Event Manager, even though the PPC Toolbox is the underlying transport mechanism used to send Apple events to other systems. By isolating the Apple Event Manager from the transport layer it uses to send Apple events as much as possible, Apple can change which transport layers are used in the future without breaking your applications.
If you really need to have connections made with no user intervention, you'll have to use the PPC Toolbox or go directly to one of the AppleTalk protocol layers. If you choose the PPC Toolbox, you'll have to make sure Guest access is allowed on the system you're trying to connect to or you'll still have to authenticate the session. (The authRequired field in the PortInfoRec returned by the PPCBrowser or IPCListPorts functions will be FALSE if Guest program linking is allowed). Since Guest access is global on a particular system and since some people may be nervous about allowing guests to Link with all high-level event aware applications on their systems, you might want to consider ADSP instead since it doesn't require any user authentication.
An unsupported init called AutoGuest, available on
the Developer CD
Series as well as our ftp site, circumvents this limitation by means of trap patches. DTS
can't recommend using this init, however, because it almost certainly will
break in future software builds.